<?php 
if($commander->getPostAction())
{ echo '<input type="hidden" name="action" value="'.$commander->getPostAction().'" />'; }
?>
<input type="hidden" id="delete" name="delete" value="0" />
<input type="hidden" id="activate" name="activate" value="0" />
<input type="hidden" id="deactivate" name="deactivate" value="0" />
<input type="hidden" id="archive" name="archive" value="0" />
<input type="hidden" id="unarchive" name="unarchive" value="0" />
<input type="hidden" id="restore" name="restore" value="0" />
<input type="hidden" id="visible" name="visible" value="0" />
<input type="hidden" id="invisible" name="invisible" value="0" />
<input type="hidden" id="up" name="up" value="0" />
<input type="hidden" id="down" name="down" value="0" />
<script type="text/javascript">
function itemActivate(itemId)
{
	jQuery.post("ajax.php<?php echo $commander->getFormAction('ajax'); ?>", 
	{ 
		action:'<?php echo $commander->getPostAction(); ?>', 
		activate: itemId
	}).success(function() { loadItems(); });
}
function itemDeactivate(itemId)
{
	jQuery.post("ajax.php<?php echo $commander->getFormAction('ajax'); ?>", 
	{ 
		action:'<?php echo $commander->getPostAction(); ?>', 
		deactivate: itemId
	}).success(function() { loadItems(); });
}
function itemArchive(itemId)
{
	jQuery.post("ajax.php<?php echo $commander->getFormAction('ajax'); ?>", 
	{ 
		action:'<?php echo $commander->getPostAction(); ?>', 
		archive: itemId
	}).success(function() { loadItems(); });
}
function itemUnArchive(itemId)
{
	jQuery.post("ajax.php<?php echo $commander->getFormAction('ajax'); ?>", 
	{ 
		action:'<?php echo $commander->getPostAction(); ?>', 
		unarchive: itemId
	}).success(function() { loadItems(); });
}
function itemSortUp(itemId)
{
	jQuery.post("ajax.php<?php echo $commander->getFormAction('ajax'); ?>", 
	{ 
		action:'<?php echo $commander->getPostAction(); ?>', 
		up: itemId
	}).success(function() { loadItems(); });
}
function itemSortDown(itemId)
{
	jQuery.post("ajax.php<?php echo $commander->getFormAction('ajax'); ?>", 
	{ 
		action:'<?php echo $commander->getPostAction(); ?>', 
		down: itemId
	}).success(function() { loadItems(); });
}
function itemRestore(itemId)
{
	jQuery.post("ajax.php<?php echo $commander->getFormAction('ajax'); ?>", 
	{ 
		action:'<?php echo $commander->getPostAction(); ?>', 
		restore: itemId
	}).success(function() { loadItems(); });
}
</script>